home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
art&graf.ix
/
art-4283
/
fix_gif
/
fixagif.doc
next >
Wrap
Text File
|
1993-01-11
|
12KB
|
267 lines
Fix-A-GIF Utility
Copyright 1992 by Lonny L. Pursell and ENCOM
All Rights Reserved.
Version 1.00
Released Dec 19, 1992
Note: Please skip to the end of this file for revision information.
Purpose
-------
This utility should fix any GIF file which is properly constructed
as outlined in the GIF specifications. The term 'fix' is used loosely
and covers several possible situations that most people run into when
downloading GIF files from different sources. This utility will do
the following:
Completely fixes GIFs that have been processed by the PC program GIFLITE.
Convert GIF89a files into GIF87a files and remove extra data.
Split GIFs with multiple images into seperate files.
Analyze GIFs and report version, resolution, colors, status, and the like.
The user can selectively remove the extra data from the GIF file.
The data removed can be output to a file for later inspection.
What you should have:
FIXAGIF.PRG the utility
FIXAGIF.DOC the documentation
STIGR9.GIF a sample GIF89a file containing 48 images
Program Use
-----------
If you want to convert a GIF from GIF87a to GIF89a, simply run the
program and select 'Start' and follow the prompts. All the options in
the program default to that situation when you first run the program.
WARNING: Always keep a backup copy of the image you want to fix if
you are not sure what is going to happen. The original GIF file is ONLY
read, not modified. Always play it safe with new or unknown software.
Keep in mind that once you split a multi-image GIF file and remove
any extensions it may have, it can't be put back together the way it was!
So keep the original GIF file unless you know what you are doing.
The program can handle GIF's with a maximum of 999 images.
Note: Options are said to be 'On' when they are highlighted.
The status of the options at run time are said to be the default
settings. What are extensions? These are defined by the GIF89a
specifications and more often than not cause problems when found
in GIF files. If your graphics software refuses to load a GIF
file, then it more than likely is a GIF89a file with extensions.
You really don't need to know what is contained in them, just being
aware of them is enough for time being.
Run the program from the GEM Desktop and a few seconds later you'll
see the main dialog, where all the options are located. The options are
as follows:
Conversion Method: This controls how the GIF file will be converted.
Clean GIF file: Removes selected extensions and writes the file back
to disk. (default)
Split GIF file: Removes selected extensions and writes each image to
a seperate disk file.
Remove Extension: These determine which extension will be removed from
the GIF file. (default: all are on)
Unknown: These are extension not defined by the GIF specifications.
Descriptions of all the extensions are beyond the scope of
this program. These are for advanced users and should be
left 'On' unless you are familiar with the GIF89a
specifications.
Options: Some additional controls you might find handy.
Retain Data: This determines whether or not to retain the data
removed during the conversion. Simply load the data file
into a file editor and see just what was removed.
(default: off)
Top/Left Justify: Determines if images will be top/left justified
or left as is. If you find that your graphics
software fails to load your split GIF files then
re-split the original GIF file with this option 'On'.
(default: off)
Output Version: This determines the version of the output file.
GIF87a: Outputs a GIF87a file. (default)
GIF89a: Outputs a GIF89a file.
Output=Input: Outputs the same version as the input GIF file.
This feature is also desinged for advanced users who are
familiar with the GIF89a specifications. It's possible
to create an illegal GIF file with this feature!
Analyze GIF: This feature scans a GIF file and reports various things
such as version, resolution, color, and stuff like that.
This function scans the entire GIF from start to finish
and also reports which extensions are present in the file.
It also reports whether or not a GIF file is structured
correctly. It's listed as 'File Status' and reports 'Good'
or 'Bad' and only filef which return good can be fixed.
A file selector will appear so you can locate a GIF file.
Press any key to return to the main dialog.
Quit: Returns you to the GEM Desktop.
Info: Show credit dialog. (You might want to read this.)
Help: Show help dialog. (You should read this.)
Start: Starts the conversion with the options you have selected.
--Online help--
For further details on a specific option, click on the title bar
above it. If you don't read this doc file at least read the online
help dialogs.
--To convert a GIF file--
Selecting all the options from the main dialog, then select 'Start'.
Hint: You might want to analyze the GIF file first with the analyze
feature. A file selector will then appear, now locate the input GIF file.
After selecting the input GIF file the program will scan the GIF to make
sure it's structured correctly. If the GIF file is good a second file
selector will appear so you can select the output path. You only need path
here, not a file name. After selecting the output path the conversion will
begin. You can watch it's progress as the program displays a simplified
representation of the GIF files structure as it converts it. After
it's converted you must press a key to return to the main dialog, where
you can either quit or convert another GIF file. If the input GIF file
you selected is bad the program will tell you so. The 'Analyze GIF'
might display a more detail explaination of the problem, but not very
often.
--Output details--
My original intent was to write a utility to split GIF files with
multiple images. As it turns out I managed to follow the GIF87a/89a
specifications so closely that it will clean up any GIF you feed it.
Certain files are automatically named for you, to prevent accidental data
loss. Here's and example of how the output works...
You input BIGRIVER.GIF
It outputs BIGRIFIX.GIF (if you selected clean)
It outputs BIGRI001.GIF (if you selected split... more than 1 image...
BIGRI002.GIF ...
BIGRI003.GIF and so on...)
It also outputs BIGRIGIF.DAT (same dir as the output file)
Note: Only the first 5 characters of the input file are used for the output
file name.
This utiltiy is very flexible in that you can selectively remove any
extension you like. Trying to split a GIF file with one image
won't hurt anything, since the utility scans the GIF file before trying.
Trying to clean a GIF file that contains no extensions won't hurt
anything either.
You should keep the original GIF in a safe place and use only a backup
copy just in case. The input GIF file is only read, but should something
go wrong it's best to have a backup copy. Don't use your hard drive as
the destination path unless you are comfortable with the program.
All the extra data removed from the file can be saved to a seperate file.
This way you can read any comments that may of been left by the artist or
package that created the file. I added this feature to avoid having to
load the GIF files into a disk editor and search high and low for comments.
Free disk space is NOT checked on the destination drive.
Should an error be detected, all open files will be closed and the will
return to the main dialog.
That's pretty much it.
--Some notes--
Should run in any resolution on any ST compatible machine as it doesn't
attempt to display GIF files. Unlike some GIF conversion/fix utilities
this one requires very little memory as it converts the file in 256 byte
chuncks and only buffers small parts of the original GIF file. It may
be a bit slower, but you won't get an out of memory message. Using a
ramdisk is your best bet if you want to speed up the conversion. It should
be able to convert GIF files that are much larger than your systems free
memory. Basically, you are limited only by disk space.
About the program
-----------------
This program is the result of much fustration on my part due to the
lack of a good GIF viewer that will read any GIF you feed it. You don't
see to many GIF89a files, but when you do, nothing will load them properly.
On top of that, the ones I've come across contain more than one image, a
comeplete animation infact with comments. I have one with 32 frames and
another with 48 and nothing that will load any of the images past the first
one. Other GIF fix prorgams failed to fix the larger of the two, infact
it made it worse. Most of these utility either completely ignore the
extra images or they interpret the extra images as illegal data in the
file.
This program was written in GFA-Basic v3.6TTe on an Atari TT030.
Support
-------
As Sal would say: "Why pay retail? Botta-Boom! Botta-Bing!"
This program is FreeWare. Should you find a GIF file which this
program fails to fix please send me the GIF file. Please report any
bugs should you find one or any ideas you might have for a feature.
Donations of any kind are welcome, but not required.
I would like to thank those who contacted me. Thanks!
I can be reached via the following methods:
U.S. Postal Service...
Lonny L Pursell
PO Box 145
Pandora OH 45877
USA
Voice...
Telephone: (419)-384-3594 after 4:00 PM [est] most any day
Modem...
CodeHead Quarters BBS
(213)-461-2095 [1200/2400/9600]
username: Lonny Pursell
Usual stuff
-----------
Atari, GEM, ST, and TT are registered trademarks of Atari Corp.
GIF, GIF87a, and GIF89a are copyrighted by CompuServe Inc.
GFA-Basic is a registered trademark of GFA Systemtechnik
All other items mentioned are trademarked by their respective owners.
There are NO implied warranties on this program, use at your own risk!
The author is NOT responsible (in no way shape or form) for lost data
or damaged hardware due to the use or misuse of this program.
Not for sale! This progam must remain unmodified along with this
doc file if it is to be distributed via PD libraries or uploaded to
any type of media storage system.
Revision history
----------------
v0.50 [beta] First release, hopefully bug free.
v0.51 [beta] The output file selector only needs the output path,
as it uses the input file name automatically. The
fixed GIF file will have a file extension of 'FIX'
to reduce the chance of data loss. The status display
now shows removed data in reverse video. Unknown
extensions will be removed, that is extensions not
defined by the GIF specification. Several internal
changes have been made that will allow selective
extension removal in a future version.
v0.52 [beta] It was really late, I forgot what I did. :^)
v1.00 Added a real GEM interface, added the 'Analyze GIF'
feature, added user selectable extension removal,
modified the way ouput files are named again, improved
error handling.
Atari Rules!
--EOF--